﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BaiVieta.ascx.cs" Inherits="Webmau.Controls.BaiVieta" %>
<%@ Register src="Pager.ascx" tagname="Pager" tagprefix="uc1" %>
<p>
    <br />
    Lọc theo người đăng: 
    <asp:TextBox ID="txtTim" runat="server" Width="209px"></asp:TextBox>
    <asp:Button ID="btnTim" runat="server" Text="Tìm" onclick="btnTim_Click" />&nbsp;Điều 
    kiện lọc<asp:RadioButtonList ID="RadioButtonList1" runat="server" 
        RepeatLayout="Flow" Width="250px">
        <asp:ListItem Value="0">Cho thuê phòng</asp:ListItem>
        <asp:ListItem Value="1">Cần thuê phòng</asp:ListItem>
    </asp:RadioButtonList>
<hr />
</p>
<uc1:Pager ID="pagerTop" runat="server" />
<asp:DataList ID="dlBaiViet" runat="server">
   <ItemTemplate>
        <div class="danhsach list">
            <a href='<%# DataAccess.Link.ToBaiViet(Eval("MaBaiViet").ToString()) %>'>
                <img src='<%# DataAccess.Link.ToHinhBVk(Eval("Hinh").ToString()) %>'
                    alt='<%#HttpUtility.HtmlEncode(Eval("TenBaiViet").ToString()) %>' />
            </a>
            <div class="detail">
                <h3>
                    Tên :  <a href='<%# DataAccess.Link.ToBaiViet(Eval("MaBaiViet").ToString()) %>'>
                       <%#HttpUtility.HtmlEncode(Eval("TenBaiViet").ToString())%>
                    </a>
                </h3>
                <p>
                   Nội dung:  <%#HttpUtility.HtmlEncode(Eval("NoiDung").ToString())%>
                </p>
                <p class="gia">
                   Loại tin: <span>
                        <%#Eval("LoaiTin")%></span>
                </p>
                
                <p class="nguoidang">
                    Người đăng: <a href='<%# DataAccess.Link.ToTrangCaNhan(Eval("IDNguoiDung").ToString()) %>'>
                    <%#(Eval("IDNguoiDung").ToString()) %>
                    </a>
                </p>
                   <p>
                   Thời gian:  <%#HttpUtility.HtmlEncode(Eval("ThoiGian").ToString())%>
                </p>
            </div>
        </div>
    </ItemTemplate>
</asp:DataList>
<uc1:Pager ID="pagerButtom" runat="server" />
